package local.blueheart.data.jxmobilemigrate.task;

import local.blueheart.data.jxmobilemigrate.util.RandomUtil;

public abstract  class BaskTaskRunner implements TaskRunner {

    private boolean running = false;

    private String taskId;

    private String taskName;

    public BaskTaskRunner(String taskName) {
        this.taskId = RandomUtil.getRandomUUID();
        this.taskName = taskName;
    }

    public String getTaskId() {
        return taskId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }



    @Override
    public boolean start() {
        return false;
    }

    @Override
    public boolean stop() {
        return false;
    }

    @Override
    public boolean destory() {
        return true;
    }

    @Override
    public boolean isRunning() {
        return running;
    }

    public abstract boolean execute();
}
